import { mapActions } from 'vuex'

export default {
  name: 'placeOrder',
  data () {
    return {
    	confirmOrderNumber: "",
    	isOnline: 1,
    	invoiceType: 0,
      buyGoodsArr: [1, 2, 3],
      counponType: 0
    }
  },
  methods: {
		...mapActions([
			// 获取订单编号
			'changeOrderNumber'
		])
	},
	mounted: function(){
		window.document.title = "确认订单";
		// 获取设置订单编号
		var urlCur = window.location.href;
		if(urlCur.indexOf("=") != -1){
			this.confirmOrderNumber = urlCur.split("=")[1];
			this.changeOrderNumber(this.confirmOrderNumber);
		}else{
			this.confirmOrderNumber = this.$store.state.shouye.confirmOrderNumber;
		}
		
		// 设置线上、线下支付
		this.isOnline = this.$store.state.shouye.isPayOnline;
		
		// 设置发票类型
		this.invoiceType = this.$store.state.shouye.invoiceType;
	}
}